/**============================================================================
 *
 * Author: luo1o1o1o 
 *
 * Last modified: 2021-07-26 10:42
 *
 * Description: 微博数据格式校验
 *
 ============================================================================**/

const validate = require('./_validate')
// 校验规则
const SCHEMA = {
    type: 'object',
    properties: {
        content: {
            type: 'string',
        },
        image: {
            type: 'string',
            maxLength: 255,
        },
    },
}

/**
 * @Author: luo1o1o1o
 * @QQ: 330240995, @PHONE: 17600071321
 * @Date: 2021-06-09 11:19
 * @desc: 校验用户数据格式
 */
function userValidate(data = {}) {
    return validate(SCHEMA, data)
}

module.exports = userValidate
